package com.agile.springboot.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.models.auth.In;
import lombok.Data;
import java.util.Date;

@TableName("user_info")
@Data
public class User {

    @TableId(value = "id")
    private String id;//用户表主键
    private String username;//用户名
    private String password;//密码
    private String phone;//绑定手机号
    private Integer age;//年龄
    private String profession;//职业
    private String institution;//所属机构、单位（大学、公司）
    private Integer identity;//身份（0是管理员，1是租户，2是用户，3是答者）
    private String status;//登录权限是否启用（1启用，0不启用）
    private String created_by;//创建人
    private Date creation_date;//创建时间
    private String last_updated_by;//最后修改人
    private Date last_update_date;//最后修改时间
    private Integer is_deleted;//是否删除（1删除，0未删除）
    private String parent_id;//用户所属上级id
    private String questionnaire_count;//用户可发布问卷数量（由租户设置）

    public  User(){

    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public User(String id, String username, String password, String phone, Integer age, String profession, String institution, Integer identity, String status, String created_by, Date creation_date, String last_updated_by, Date last_update_date, Integer is_deleted, String parent_id, String questionnaire_count) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.age = age;
        this.profession = profession;
        this.institution = institution;
        this.identity = identity;
        this.status = status;
        this.created_by = created_by;
        this.creation_date = creation_date;
        this.last_updated_by = last_updated_by;
        this.last_update_date = last_update_date;
        this.is_deleted = is_deleted;
        this.parent_id = parent_id;
        this.questionnaire_count = questionnaire_count;
    }
}
